/** 病害相关的数据库初始化 */
import {
	TAB_DISEASESTATUS
} from "../config";

/** 初始化现状表 */
export const createDiseaseStatusTable = db => {
	const sql = `
		create table if not exists '${TAB_DISEASESTATUS}'(
			 _id  varchar(255),
			  id   int primary key,
			  code  varchar(255),
			  createUserId   int,
			  createUserName  varchar(255),
			  diseaseGrade   varchar(255),
			  diseaseGradeId   int,
			  diseaseNo  varchar(255),
			  diseaseStatus  varchar(255),
			  diseaseCode varchar(255),
			  leaf  int,
			  parentId   int,
			  recordCreateDate   int,
			  recordUpdateDate   int,
			  treeId  varchar(255),
			  treeLevel   int
		);
	`;
	return db.execute(sql);
}
